<template>
  <div class="home">
    <el-container>
      <el-header>
        <TheHeader></TheHeader>
      </el-header>
      <el-container>
        <el-aside :width="collapse ?  '52px' : '200px' ">
          <TheAside></TheAside>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>


  </div>
</template>

<script>
import bus from "../assets/js/bus";
import TheAside from "./TheAside";
import TheHeader from "./TheHeader";
export default {
  components: {TheHeader, TheAside},
  data() {
    return{
      collapse:false
    }
  },
  created() {
    bus.$on('collapse',msg =>{
      this.collapse = msg
    })
  },
  methods: {}
}
</script>

<style  scoped>
.home{
  height: 100%;
}
.el-container{
  height: 100%;
}
.el-header{
  padding: 0;
  height: 100%;
}
.el-aside{
  overflow: hidden;
}
</style>
